package DecertifiSys.untill.baseUntill;


import net.iharder.Base64;

import java.io.IOException;

/**
 * Created by zhoumeineng on 2018/2/1.
 * 加解密工具
 *
 */

public class En_DecryptUntill {

    /**
     * base64 加密
     * */
    public static String Base64Encrypt(String string){
       return Base64.encodeBytes(string.getBytes());
    }


    /**
     * base64解密
     * */
    public static String Base64Decrypt(String string){
        try {
            return Base64.decode(string).toString();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }

}
